Debug in Eclipse:

Following things should be aware of:

1. Toggle break point: During debug, it is used to pause/hault the test script execution. The importance of toggel breakpoint comes into picture only when you are running your code in debug mode.

Note: Running code in normal mode will not pause/hault for Toggle break point.


2. Debug as: It is one of the run mode in java. During this mode, the exection pauses at every toggle breakpoints


3. F5 (Step into): It is used to run the java program line by line. F5 will enter the block If it is used in the method call statement, object creation statement etc.


4. F6 (Step Over): It is used to run the java program line by line. But F6 will execute the whole block at a time without entering inside it especially at method call statement, object creation statement etc.


5. F7 (Step Return): If you entered the block accidently & you want to come out of the block by executing complete block then press F7.


6. F8 (Normal mode): Running the execution form debug mode to normal mode we use F8 key. Where as F8 will hault/pause at every toggle break points.


7. watch: It is used to inspect or see the runtime values at runtime.
   To apply the watch, we must select the variable/object/line etc first & then right click & select watch. Upon applying watch, the runtime value stored in the variable/object/line etc will be displayed in Expression tab during runtime.

   Note: Alternative for watch is select the variable/object/line
   and then press Ctrl + Shift + i

8. Debug Viewer
  (a) Varaible: 
 - This section will display all the variables which are executed OR loaded into the memory will be displayed.
 - We can modify the variable values during runtime in the variable section.


  (b) Break point: This section will show all the break points applied & its line numbers. From here only you can enable OR disable the breakpoint just by selecting/unselecting the checkbox.


  (c) Expression: All the watch values can be seen at Expression section.
